package com.github.ldw4033.activiti.ch05;

import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngineConfiguration;

/**
 * Created by dw.liu on 2015/8/21 0021.
 */
public class ActivitiUtils {
    private static ProcessEngine processEngine;

    public static synchronized ProcessEngine getProcessEngine(){
        if(processEngine==null){
            processEngine= ProcessEngineConfiguration
                    .createProcessEngineConfigurationFromResourceDefault()
                    .buildProcessEngine();
        }

        return processEngine;
    }

}
